package com.xiaoqi.springboot.service.impl;

import com.xiaoqi.springboot.mapper.UserMapper;
import com.xiaoqi.springboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Transactional // 事务操作
    @Override
    public int updateUserById(String name,Integer id) {
        int i = userMapper.updateUserById(name, id);
        int b = 10/0;
        return i;
    }
}
